package com.ysd.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ysd.entity.Express;
import com.ysd.service.ExpressService;
import com.ysd.util.Result;

@Controller
public class ExpressController {
	@Autowired
	ExpressService eService;
	
	@RequestMapping("getExpress")
	@ResponseBody
	public Object getExpress(Express express) {
		int n=eService.insertExpress(express);
		if (n>0) {
			return Result.toClient("0", "发货成功", 0, null);
		} else {
			return Result.toClient("1", "发货失败", 0, null);
		}
	}
}
